package com.sky.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import  com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /**
     * 删除菜品口味
     * @param dishId
     */
    @Delete("delete from dish_flavor where dish_id=#{dishId}")
    void DelectByDishId(Long dishId);

    /**
     * 新增口味
     * @param
     */
    void InsertByDishId(List<DishFlavor> flavors);

    /**
     * 根据 dish id来查询口味
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> selectBydishId(Long id);
}
